using System.Xml.Serialization;
using LinqToDB;
using LinqToDB.Mapping;
using NalogGarLoader.Data.Tables.GarEntries;

namespace NalogGarLoader.Data.Tables.GarEntries.AddressTables;

#nullable disable

[XmlRoot("ITEM")]
[Table(GarTypes.AS_CHANGE_HISTORY)]
public class ChangeHistory : GarAddressTableEntryBase
{
    [XmlAttribute("CHANGEID")]
    [PrimaryKey]
    public long ChangeId { get; set; }

    [XmlAttribute("OBJECTID")]
    [Column]
    public long ObjectId { get; set; }

    [XmlAttribute("ADROBJECTID")]
    [Column]
    public Guid AdrObjectId { get; set; }      

    [XmlAttribute("OPERTYPEID")]
    [Column]
    public int OperTypeId { get; set; }   

    [XmlAttribute("NDOCID")]
    [Column]
    public long NDocId { get; set; }    

    [XmlAttribute(AttributeName = "CHANGEDATE", DataType = "date")]
    [Column(DataType = DataType.Date)]
    public DateTime ChangeDate { get; set; }             
}